#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e4+1000;
int a[maxn];
int main(void){
    int n; cin >> n; int target; cin >> target;
    map<int, int> map1;
    for (int i = 1; i <= n; i++) {
        int x; cin >> x;
        if (map1.count(target - x)) {
            cout << map1[target - x] - 1 << " " << i - 1<< endl;
            break;
        }
        map1.insert({x, i});
    }
   	return 0;
}
